import request from '@/utils/request'

export function exportExcel() {
  return request({
    url: `/goods/excel/export`,
    method: "GET"
  })
}

export function goodsAll(current, data) {
  return request({
    url: `/goods/getGoodsAll/${current}`,
    data: data,
    method: "post"
  })
}

export function delGoodsById(id) {
  return request({
    url: `/goods/delete/${id}`,
    method: "delete"
  })
}

export function categorys() {
  return request({
    url: `/goods/category/categorys`,
    method: "get"
  })
}

export function addGoods(data) {
  return request({
    url: `/goods/addGood`,
    data: data,
    method: "post"
  })
}

export function maxTop(data) {
  return request({
    url: `/goods/top`,
    data: data,
    method: "post"
  })
}

export function delTop(data) {
  return request({
    url: `/goods/delTop`,
    data: data,
    method: "post"
  })
}

export function editGoodsUrl(data) {
  return request({
    url: `/goods/editGoodsUrl`,
    data: data,
    method: "post"
  })
}

export function getGoodsUrlById(id) {
  return request({
    url: `/goods/getGoodsUrlById/${id}`,
    method: "get"
  })
}

export function goodsEdit(param) {
  return request({
    url: `/goods/update`,
    method: "post",
    data: param
  })
}

export function inspection(param) {
  return request({
    url: `/wx/message/a/b`,
    method: "get",
    params: {
      id: param.id,
      userId: param.userId,
      content: param.content,
      title: param.title,
      status: param.status
    }
  })
}
